1. Field of the Invention
This invention relates to a color graphics processor for raster-scan display, and more specifically to the scan image generator and the color video encoder of the color graphics processor for processing graphic transactions and encoding composite color video signals for color video display devices, such as entertainment devices (video game machines), education aids, communication equipment, measure equipment, check equipment, advertisement equipment, KARAOKE machines, word processor, video editor, driver aids, printing aids, music aids, exercise aids, handicapped aids and so on.
2. Prior Art Description
A raster scan image generator and a color video encoder are two essential parts of a color graphic processor that outputs images to a raster-scan video display. The efficiency and the accuracy of generating raster scan images as well as encoding video signals determine not only the quality of displayed graphics but also the performance that can be provided by a color graphics processor for a raster-scan display.
Conventionally, there are several methods for generating graphics for a raster-scan display. One of the simplest methods is that graphic data are directly read from memory and displayed on a display device simultaneously without using any extra buffers. An example of using this method is a simple character display screen used in a personal computer or workstation.
A scan image generator for this method can be implemented with a simple and small circuit. However, there are several limitations in such a scan image generator. One clear limitation is that characters must be located along the grid of a character size so that no character can overlay others.
Another conventional method for generating raster-scan images is called scan line buffer method that uses scan line buffers. In a scan line buffer method, the image are segmented into horizontal lines. Typically, this method is further categorized as either a single scan line buffer method or a double scan line buffer method.
In a single scan line buffer method, a buffer is provided for storing the information of one horizontal scan line. In general, a horizontal scan line is drawn into the buffer during a horizontal blanking period to avoid the interference between drawing and displaying. An example of using this method is the motion picture (called Sprite) generator in Super Famicom.RTM..
In an ordinary raster-scan display, the time for drawing can take only one third of the time for displaying. Therefore, the performance of drawing in a single scan line buffer method is greatly limited.
In a double scan line buffer method, two buffers are provided for respectively storing information of one horizontal scan line. One buffer for drawing a scan line image and the other buffer for displaying the image on a screen are alternately switched during each horizontal blanking period. An example of using this method is the motion picture generators in arcade video game machines.
Compared with the single scan line buffer method, this method has longer time for drawing and, thus, the performance of drawing is better. However, the size of the required memory is twice of that in the single scan line buffer method.
Another conventional method using a memory buffer is a frame buffer method. This method can be used to support the application of a bit map display. The frame buffer method can further be divided into two methods. One is called single frame buffer method and the other is called double frame buffer method.
In the single frame buffer method, a buffer is provided for storing the information of one video frame. An example of using this method is graphics display processors used in personal computers or workstations. This method has the advantage that a whole frame of image can be drawn without scanning the image line by line. Nonetheless, the drawing process is also displayed because drawing is done while the image is being displayed. In addition, the size of the required memory for the frame buffer is large.
In contrast to the single frame buffer method, two frame buffers are provided in the double frame buffer method for respectively storing the information of one video frame. A buffer for drawing a video frame image and the other buffer for displaying the image on a screen are alternately switched during a vertical blanking period. An example of using this method is graphics generators used in graphic workstations and 3-dimentional video game machines.
Compared with the single frame buffer method, the double frame buffer method provides better quality for the graphics on a screen because it avoids displaying the drawing process. However, the size of the required memory is very large.
In some existing video game machines such as Family Computer.RTM. and Super Famicom.RTM., a screen image consists of many graphic characters. And data of each character consists of character pattern data (such as pixel array data) and character attribute data (such as character format, color palette and so on). Character pattern data and character attribute data are managed independently.
In spite of the fact that many character data use one fixed character attribute data, they must be managed independently. This method makes the software design more complicated and it is not a good policy either from the viewpoint of software performance and memory utilization.
Traditionally, there are two methods for pointing to character data One is character number method and the other is address pointer method. The character number method has an individual character number for each block of character data. Generally, the size of every block is limited to one unified size. The address pointer method uses an absolute address pointer and/or an offset address pointer. The size of every block is not limited.
The character number method has two advantages. One is that each character number represents an individual character that allows more efficient CPU transaction and also better memory utilization. The other is that the fixed size of each character makes it easier for CPU to calculate pixels for update pixel data directly. The address pointer method, on the other hand, had the advantage that the size of each block is not limited.
From the above discussion, there is a need for a simple and efficient mechanism that can generate high quality scan images for a color graphics processor. To reduce the cost of a graphics processor, it is also important that the size of the buffer memory for storing pixel information should be small.
The other important part of a color graphics processor is the color video encoder. FIG. 1 shows a conventional color video encoder as disclosed in Japan Patent No. 2-50477. In the color video encoder, the color sub-carrier is represented by a two-level signal such as a square wave. It is called a two-value selective color video encoder. The color video encoder comprises a phase signal generator 101, a level signal generator 102, a phase signal selector 103, a color code signal generator 104 and a color signal output device 105.
The phase signal generator 101 generates a plurality of phase signals whose frequency equals to that of a color sub-carrier signal. The phase difference between two adjacent phase signals is identical. The level signal generator 102 generates a plurality of level signals having different voltage levels. Each two adjacent level signals have identical voltage difference. The color code signal generator 104 generates a color code signal consisting of a hue select code and a level select code.
The phase signal selector 103 selects one phase signal among the plural phase signals according to the hue select code. The color signal output device 105 selects a pair of the level signals according to the level select code. The amplitude of the selected phase signal is modulated between the selected pair of voltage levels to generate a composite video signal as the video output signal.
The two-value selective color encoder requires only a small and simple circuit. It can be constructed on a single semiconductor chip. However, the generated color variation of the encoder is poor and the interference between chrominance and luminance is difficult to avoid.
Two kinds of video encoders are available. One is an analog video encoder, and the other is a digital video encoder. An analog video encoder comprises a color sub-carrier generator for generating two color sub-carrier wave signals. The two signals are similar except that one is 90 degree phase shifted from the other. The analog video encoder also has a matrix means for converting color space from RGB signals to a luminosity signal (Y) and color difference signals (R-Y and B-Y) that are orthogonal to each other.
In the analog video encoder, there are two multipliers for multiplying color sub-carrier wave signals and color difference signal. One multiplies a color sub-carrier wave signal with the color difference signal (R-Y) and the other multiplies the shifted color sub-carrier wave signal with the color difference signal (B-Y). The two output signals from the multipliers are mixed by a first mixer to generate a chrominacity signal. A second mixer then mixes the luminosity signal with the chromaticity signal to generate a composite video signal.
An analog video encoder has several advantages. It has a relatively simple analog circuit and can generate rich color variations easily. The characteristic of Y/C (luminosity/chromaticity) is also good. However, the analog circuit is difficult to be fabricated on a single semiconductor chip. In addition, the output video signal is an analog signal that is subject to noise. Furthermore, an analog video encoder for NTSC standard can not be made compatible with one for PAL standard without replacing an oscillator and vice versa.
A digital video encoder is accomplished by replacing the analog circuit in the analog video encoder with a digital circuit. The input signal to a digital video encoder is digital. In the digital video encoder, a product-sum calculator is used instead of a matrix means for the color space conversion. The color sub-carrier generator is replaced by a digital circuit employing ROM that stores sine waveform table to generate 2 sets of digital color sub-carrier wave signals having 90 degree phase difference between each other. Digital multipliers replace the analog multipliers and digital adders replace the mixers. Finally, the digital signals are converted to analog video signals through DAC (digital to analog converter).
In general, a digital video encoder can generate rich color variations. The signals are more immune to noise. Digital filters can be used to cancel the interference between chrominance and luminance. The signal generated can be very accurate and has high resolution. A video encoder for NTSC standard can be compatible with one for PAL standard without replacing an oscillator. In addition, trimming of an oscillator's frequency is usually not necessary. However, the disadvantage is that the circuit is typically large and complicated.